<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>icon</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    {include file="_Fragment/css" /}
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <table class="layui-table">
                        <colgroup>
                            <col width="150">
                            <col width="200">
                            <col width="50">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>名称</th>
                            <th>图标</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {notempty name="data"}
                        {volist name="data" id="vo"}
                        <tr>
                            <td>{$vo.name}</td>
                            <td><img src="{$vo.value}" width="60" height="60"></td>
                            <td>
                                <button onclick="selects('{$vo.value}')" class="layui-btn layui-btn-xs">选择</button>
                            </td>
                        </tr>
                        {/volist}
                        {else/}
                        <tr><td colspan="3" style="text-align: center;">暂无数据</td></tr>
                        {/notempty}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="_Fragment/javascript" /}
<script src="/static/common/jquery-3.6.0.min.js"></script>
</body>
<script>
    function selects(url) {
        parent.$('#icon').val(url);
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    };
</script>
</html>